const express = require('express');
const router = express.Router();
const accountController = require('../controllers/accountController');
const authMiddleware = require('../middleware/auth');

// 所有账号路由都需要认证
router.use(authMiddleware);

// 账号管理路由
router.get('/', accountController.getAccounts);
router.get('/sync', accountController.syncAccounts);
router.get('/:id', accountController.getAccountDetail);
router.post('/', accountController.createAccount);
router.put('/:id', accountController.updateAccount);
router.delete('/:id', accountController.deleteAccount);

module.exports = router;